const { defineConfig } = require('@vue/cli-service')
const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
const path = require('path')
function resolve(dir) {
  return path.join(__dirname, dir)
}
module.exports = defineConfig({
  lintOnSave: false,
  transpileDependencies: true,
  productionSourceMap: process.env.NODE_ENV === 'development',
 
  configureWebpack: {
    // provide the app's title in webpack's name field, so that
    // it can be accessed in index.html to inject the correct title.
    resolve: {
      alias: {
        '@': resolve('src')
      }
    },
    plugins: [
      new MomentLocalesPlugin({ localesToKeep: ['zh-cn'] })
    ],
  },
  css: {
    loaderOptions: {
      sass: {
        additionalData: `@import "@/styles/mixin.scss";`
      }
    }
  },
})
